<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" src="Public/js/jquery-1.7.js"></script>
<script type="text/javascript" src="Public/js/jquery.form.js"></script>
<script type="text/javascript" src="Public/js/jspopup/popup.js"></script>
<script type="text/javascript" src="Public/js/jHtmlArea/scripts/jHtmlArea-0.7.0.js"></script>
    <link rel="Stylesheet" type="text/css" href="Public/js/jHtmlArea/style/jHtmlArea.css" />
<style>
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
	font-size: 12px;
}
.STYLE1 {
	color: #000;
	font-size: 12px;
}
.STYLECN {
	color: #000;
	font-size: 12px;
	font-weight:bold;
	cursor:pointer;
}
.STYLEEN {
	color: #000;
	font-size: 12px;
	font-weight:normal ;
	cursor:pointer;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
.full_width table{
	font-size: 12px;
	text-align:center;
}
.full_width div{
	font-size: 12px;
}
#container1{
	height:20px;
}
.drawers{
	font-size:12px;
}
.drawers a {
	font-size: 12px;
	color: #000;
	text-decoration: none;
}
.drawers a:link {
	
	color: #000;
	text-decoration: none;
}
.drawers a:visited {
	
	color: #000;
	text-decoration: none;
}
.drawers a:hover {
	
	/*color: green;*/
	text-decoration: none;
}
.drawers a:active {
	
	color: #000;
	text-decoration: none;
}
#cText tr td{
	border:1px dotted  #999;
	border-collapse:0px;
	border-spacing:0px;
	
}

</style>
<script>
$(document).ready(function(){
	$("#m_text_cn").htmlarea();
	$("#save").bind("click",function(){
		$('#userForm').ajaxSubmit(options); 
	});
	
	//添加行业执行的代码
	var options={
			 beforeSubmit:  showRequest,  
			 success:       showResponse  
	};
	function showRequest(formData, jqForm, options) {    
		if($("#m_name_cn").val()==""){
			$("#errname").html("<img align='absmiddle' src='Public/image/err.gif' />分类名称不能为空");
			return false;
		}else{
			$("#errname").html("<img align='absmiddle' src='Public/image/yes.gif' />");
		}
		 return true;
	}  
	function showResponse(responseText, statusText, xhr, $form)  { 
		var _ok=parseInt(responseText);
		if(_ok>=1){
			pAlert("信息提示","保存成功");
			
		}else{
			pAlert("信息提示","保存失败");
			//parent.window.location.reload();
		}
	} 
});
function pAlert(title,content){
	 var pop=new Popup({ isClose:true,contentType:4,isReloadOnClose:false,width:200,height:50,isSupportDraging:false,isBackgroundCanClick:true});
    pop.setContent("title",title);
    pop.setContent("alertCon",content);
    pop.build();
    pop.show();
}
</script>
</head>
<body>
<div id="container" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#E9F5FC"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"></td>
                <td width="94%" valign="bottom"><span class="STYLECN"> <a href="?m=Admin&a=editfenlei&m_id={$m_id}">[中文管理]</a></span><span class="STYLEEN"> <a href="?m=Admin&a=editfenleien&m_id={$m_id}">[英文管理]</a></span></td>
              </tr>
            </table></td>
            <td><div align="right">
              <span id="addUser" style="display:none" ><img src="Public/tpl-default/images/add.gif" width="10" height="10"  /> <span style="cursor:pointer">添加分类</span></span>   &nbsp; <!--  <img src="Public/tpl-default/images/del.gif" width="10" height="10" /> <span style="cursor:pointer">删除 </span>   &nbsp;&nbsp;<img src="Public/tpl-default/images/edit.gif" width="10" height="10"  /> <span style="cursor:pointer">编辑   </span>&nbsp;</span>--><span class="STYLE1"> &nbsp;</span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
  <td vlign="top">
  <form method="post" action="?m=Admin&a=savefenlei" id="userForm">
  	<table width="100%" border="0" id="cText" cellspacing="0" cellpadding='0' class="drawers">
  		<tr>
  			<td>分类名称</td>
  			<td><input type="text" name="data[m_name_cn]" id="m_name_cn" value="{$menu['m_name_cn']|default=''}"> <span id="errname"></span></td>
  		</tr>
  		<tr>
  			<td>分类内容</td>
  			<td>
  			<textarea id="m_text_cn" name="data[m_text_cn]" cols="83" rows="15">{$menu['m_text_cn']}</textarea>
  			</td>
  		</tr>
  		<tr>
  			<td colspan="2" align="center">
  				<input type="button" value="保存" id="save" name="save">
  				<input type="submit" value="保存" style="display:none">
  				<input type="hidden" value="{$menu['m_id']}" name="data[m_id]">
  				<input type="hidden" value="zn-cn" name="data[m_bj]">
  			</td>
  		</tr>
  	</table>
  	</form>
	</td>
	</tr></table>
</div>
</body>
</html>